//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "player\fn_addScore.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

if (!isServer) then {
	[QGVAR(s_execute),[QUOTE(FFUNC(addScore)),_this]] call FFUNC(callEvent);
} else {
	private ["_player","_score"];
	DEFAULT_PARAM(_player,0,objNull);
	DEFAULT_PARAM(_score,1,0);
	
	if (IS_OBJECT(_player) && {!(isNull _player)} && {IS_SCALAR(_score)}) then {
		_player addScore _score;
	};
};

TRACE("End");
TMFPROFILERSTOP;